package cn.edu.scau.cmi.chenjia.composite.safe;

import java.util.HashSet;
import java.util.Set;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class SafeTeam extends SafeOrganization{
	private String name;
	private String department;
	
	public List<SafeOrganization> children=new ArrayList();
	
	@Override
	public String doSomething() {
		return "我是安全性组合模式中的团队组件";
	}

	@Override
	public SafeOrganization getParent() {
		return this.getParent();
	}
	
	
	public SafeOrganization addChild(SafeOrganization child){
		children.add(child);
		return this;
	}
	
	
	
	public SafeOrganization removeChild(SafeOrganization child){
		children.remove(child);
		return this;
	}
	
	public SafeTeam() {};
	
	public SafeTeam(String name,String department) {
		this.name=name;
		this.department=department;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public List<SafeOrganization> getChildren() {
		return children;
	}

	
	public void setChildren(List<SafeOrganization> children) {
		this.children = children;
	}
	
}
